package com.bw.crop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName sys_transport
 */
@TableName(value ="sys_transport")
@Data
public class SysTransport implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 仓库id
     */
    private Integer sid;

    /**
     * 零销售id
     */
    private Integer pid;

    /**
     * 开始地址
     */
    private String startAddress;
    private Integer cropId;

    /**
     * 结束地址
     */
    private String endAddress;

    /**
     * 配送状态 0 为未配送 1为配送中 2为已送达
     */
    private String status;

    /**
     * 司机名字
     */
    private String haulerName;

    /**
     * 农作物名
     */
    private String cname;

    /**
     * 完成时间
     */
    private Date completionTime;

    /**
     * 数量
     */
    private Integer num;

    /**
     * 开始经纬度
     */
    private String startIp;

    /**
     * 结束经纬度
     */
    private String endIp;


    private Integer fsid;





    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysTransport other = (SysTransport) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getStartAddress() == null ? other.getStartAddress() == null : this.getStartAddress().equals(other.getStartAddress()))
            && (this.getEndAddress() == null ? other.getEndAddress() == null : this.getEndAddress().equals(other.getEndAddress()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getHaulerName() == null ? other.getHaulerName() == null : this.getHaulerName().equals(other.getHaulerName()))
            && (this.getCname() == null ? other.getCname() == null : this.getCname().equals(other.getCname()))
            && (this.getCompletionTime() == null ? other.getCompletionTime() == null : this.getCompletionTime().equals(other.getCompletionTime()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getStartIp() == null ? other.getStartIp() == null : this.getStartIp().equals(other.getStartIp()))
            && (this.getEndIp() == null ? other.getEndIp() == null : this.getEndIp().equals(other.getEndIp()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getStartAddress() == null) ? 0 : getStartAddress().hashCode());
        result = prime * result + ((getEndAddress() == null) ? 0 : getEndAddress().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getHaulerName() == null) ? 0 : getHaulerName().hashCode());
        result = prime * result + ((getCname() == null) ? 0 : getCname().hashCode());
        result = prime * result + ((getCompletionTime() == null) ? 0 : getCompletionTime().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getStartIp() == null) ? 0 : getStartIp().hashCode());
        result = prime * result + ((getEndIp() == null) ? 0 : getEndIp().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sid=").append(sid);
        sb.append(", pid=").append(pid);
        sb.append(", startAddress=").append(startAddress);
        sb.append(", endAddress=").append(endAddress);
        sb.append(", status=").append(status);
        sb.append(", haulerName=").append(haulerName);
        sb.append(", cname=").append(cname);
        sb.append(", completionTime=").append(completionTime);
        sb.append(", num=").append(num);
        sb.append(", startIp=").append(startIp);
        sb.append(", endIp=").append(endIp);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}